// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import VueQuillEditor from 'vue-quill-editor'
import router from './router'
import Vuex from 'vuex'
import Element from 'element-ui'
import locale from 'element-ui/lib/locale/lang/en'
import 'element-ui/lib/theme-default/index.css'
import 'element-ui/lib/index.js'

Vue.config.productionTip = false
Vue.use(Vuex)
Vue.use(Element)
Vue.use(Element,{ locale })
Vue.use(VueQuillEditor)

/* eslint-disable no-new */

const test_store = new Vuex.Store({
	state:{
		username:"",
		password:"",
		id:"",
		count:5,
		clientHeight:0
	},
	mutations:{
		showUserName(state){
			alert(state.username);
		},
		showID(state){
			alert(state.id);
		},
		increment(state){
			state.count++;
		},
		getClientHeight(state){
			state.clientHeight = document.documentElement.clientHeight;
			alert(state.clientHeight);
		}
	}
});

new Vue({
  el: '#app',
  router,
  template: '<App/>',
  store:test_store,
  components: { App }
});